Program ProgramExample;

const n=100;
type table=array[1..n] of integer;
var A: table; i,x: integer; yes: boolean;



procedure search(value: integer; var found: boolean; var index: integer);
var limit: integer;
begin
	index:=1; limit:=n;
	while index<limit do
		if A[index]=value then
			limit := index
		else
			index := index+1;
	found := A[index] = value
end;


function mul(var a:integer; var b : integer ):integer;
begin

	mul:=a*b;
end;

function mul2(var a:integer; var b : integer ):integer;
begin

	mul:=a*b;
end;

procedure search2(value: integer; var found: boolean; var index: integer);
var limit: integer;
begin
	index:=1; limit:=n;
	while index<limit do
		if A[index]=value then
			limit := index
		else
			index := index+1;
	found := A[index] = value
end;



begin
	i:=1;
	while i<=n do
	begin
		read(A[i]);
		i:=i+1
	end;

	read(x);
	while x<>0 do
	begin
		search(x,yes,i);
		write(x);
		if yes then
			write(i);
		read(x);
	end
end.
